#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
b104caa9 |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
77ed7a2a |
|
25-Apr-2021 |
Yuichiro Goto <goto@k-tech.co.jp> |
IOMUX: Fix buffer overflow in iomux_replace_device() Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
694cd561 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Introduce iomux_replace_device() Some console devices may appear or disappear at run time. In order to support such a hotplug mechanism introduce a new iomux_replace_device() helper to update the list of devices without altering environment. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
400797ca |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out for_each_console_dev() helper macro It is not only less lines of code, but also better readability when new macro is being in use. Introduce for_each_console_dev() helper macro and convert current users to it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b672c161 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Split out iomux_match_device() helper Deduplicate the code used in a few places by splitting out a common helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
658d6c58 |
|
11-Feb-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Switch to use stdio_file_to_flags() Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
70c2525c |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Stop dropped consoles When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
420782c4 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Drop indentation level by removing redundant 'else' Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
c939e1ca |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Refactor iomux_doenv() in order to increase readability Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
1f8e6985 |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
IOMUX: Preserve console list if realloc() fails It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef219c2 ("IOMUX: Add console multiplexing support.") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
3232487d |
|
21-Dec-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
console: rename search_device() to console_search_dev() Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
|
#
b0265429 |
|
16-Jan-2017 |
Simon Glass <sjg@chromium.org> |
console: Don't enable CONFIG-CONSOLE_MUX, etc. in SPL CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV are not applicable for SPL. Update the console code to use CONFIG_IS_ENABLED(), so that these options will be inactive in SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
#
24b852a7 |
|
08-Nov-2015 |
Simon Glass <sjg@chromium.org> |
Move console definitions into a new console.h file The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
3765b3e7 |
|
07-Oct-2013 |
Wolfgang Denk <wd@denx.de> |
Coding Style cleanup: remove trailing white space Signed-off-by: Wolfgang Denk <wd@denx.de>
|
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
|
#
0f899802 |
|
25-Oct-2012 |
Allen Martin <amartin@nvidia.com> |
serial: remove calls to serial_assign() Remove calls to serial_assign() that are failing now that it returns a proper error code. This calls were not actually doing anything because they passed the name of a stdio_dev when a serial_device name is exptectd. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
|
#
8440f18a |
|
25-Oct-2012 |
Allen Martin <amartin@nvidia.com> |
serial: remove calls to serial_assign() Remove calls to serial_assign() that are failing now that it returns a proper error code. This calls were not actually doing anything because they passed the name of a stdio_dev when a serial_device name is exptectd. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
|
#
036036d7 |
|
14-Sep-2012 |
Marek Vasut <marex@denx.de> |
serial: Remove CONFIG_SERIAL_MULTI from remaining sources Remove the parts depending either on disabled CONFIG_SERIAL_MULTI or ifdefs around CONFIG_SERIAL_MULTI parts since CONFIG_SERIAL_MULTI is now enabled by default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de>
|
#
52cb4d4f |
|
15-May-2009 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
stdio/device: rework function naming convention So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
|
#
16a28ef2 |
|
06-Nov-2008 |
Gary Jennejohn <garyj@denx.de> |
IOMUX: Add console multiplexing support. Modifications to support console multiplexing. This is controlled using CONFIG_SYS_CONSOLE_MUX in the board configuration file. This allows a user to specify multiple console devices in the environment with a command like this: setenv stdin serial,nc. As a result, the user can enter text on both the serial and netconsole interfaces. All devices - stdin, stdout and stderr - can be set in this manner. 1) common/iomux.c and include/iomux.h contain the environment setting implementation. 2) doc/README.iomux contains a somewhat more detailed description. 3) The implementation in (1) is called from common/cmd_nvedit.c to handle setenv and from common/console.c to handle initialization of input/output devices at boot time. 4) common/console.c also contains the code needed to poll multiple console devices for input and send output to all devices registered for output. 5) include/common.h includes iomux.h and common/Makefile generates iomux.o when CONFIG_SYS_CONSOLE_MUX is set. Signed-off-by: Gary Jennejohn <garyj@denx.de>
|